package com.yhgm.mapper;

import com.yhgm.model.entity.SqlBackups;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface SqlBackupsDao {
    @Select("select * from sql_backups limit #{page},#{size}")
    List<SqlBackups> getList(Integer page, Integer size);

    @Select("select count(id) from sql_backups")
    Integer count();

    @Select("select * from sql_backups where id =#{id}")
    SqlBackups getOneById(Long id);

    @Select("select filename from sql_backups where id =#{id}")
    String getFilenameById(Long id);

    @Delete("delete from sql_backups where id =#{id}")
    Integer deleteOneById(Long id);
}
